﻿// <copyright file="ICurveVisual.cs" company="Oleg V. Polikarpotchkin">
// Copyright © 2008-2009 Oleg V. Polikarpotchkin. All Right Reserved
// </copyright>
// <author>Oleg V. Polikarpotchkin</author>
// <email>ov-p@yandex.ru</email>
// <date>2009-05-26</date>
// <summary>OpenWPFChart library. Curve Visual's ICurveVisual interface.</summary>
// <revision>$Id$</revision>

using System.Windows;
using System.Windows.Media;

namespace OpenWPFChart.Parts
{
	/// <summary>
	/// Curve PathFigure with the Start and Stop points.
	/// </summary>
	public struct CurvePath
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="CurvePath"/> struct.
		/// </summary>
		/// <param name="path">The Curve Path segments array.</param>
		/// <param name="start">The Curve Start in pixels.</param>
		/// <param name="stop">The Curve Stop in pixels.</param>
		public CurvePath(PathSegment[] path, Point start, Point stop)
			: this()
		{
			Path = path;
			Start = start;
			Stop = stop;
		}

		/// <summary>
		/// Gets the Curve path.
		/// </summary>
		/// <value>The Curve path or null on error.</value>
		public PathSegment[] Path { get; private set; }

		/// <summary>
		/// Gets the Curve Start point.
		/// </summary>
		/// <value>The Start point.</value>
		/// <remarks>
		/// Curve Start point in pixels.
		/// </remarks>
		public Point Start { get; private set; }

		/// <summary>
		/// Gets the Curve Stop point.
		/// </summary>
		/// <value>The Stop point.</value>
		/// <remarks>
		/// Curve Stop point in pixels.
		/// </remarks>
		public Point Stop { get; private set; }
	}

	/// <summary>
	/// Curve Visual's ICurveVisual interface.
	/// </summary>
	public interface ICurveVisual
	{
		/// <summary>
		/// Gets the Curve path.
		/// </summary>
		/// <param name="isStroked"><c>true</c> if path seqments should be stroked.</param>
		/// <returns>CurvePath object.</returns>
		/// <remarks>
		/// In the case the CurvePath can't be created for some reason the returned
		/// <see cref="CurvePath.Path"/> property value is <c>null</c>.
		/// </remarks>
		CurvePath GetCurvePath(bool isStroked);
	}
}
